package designMode.single;

/**
 * @Author 肖地洋
 * @Date 2022/8/12 14:46
 */
public class StaticSingle {

    private StaticSingle(){
        System.out.println("进入方法StaticSigle()");
    }

    static class innerSingle{
        private static StaticSingle INSTANCE = new StaticSingle();
    }

    public static StaticSingle getInstance(){
        return innerSingle.INSTANCE;
    }

    public static void main(String[] args) {
        StaticSingle staticSingle = StaticSingle.getInstance();
        StaticSingle staticSingle1 = StaticSingle.getInstance();
        StaticSingle staticSingle2 = StaticSingle.getInstance();
        System.out.println();
    }
}



